package com.qfedu.provider.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表
 * @TableName db_user
 */
@TableName(value ="db_user")
@Data
public class DbUser implements Serializable {
    /**
     * 用户id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 密码
     */
    private String password;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 账号状态   1正常  0注销
     */
    private String status;

    /**
     * 逻辑删除    1存在  0删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    public DbUser(){
        this.createTime = new Date();
        this.updateTime = new Date();
        this.deleted = 1;
        this.status = "1";
    }

    public DbUser(String phone) {
        this.phone = phone;
    }
}